const userPermissions = {
    student: [{
        name: '个人中心',
        icon: 'user',
        path: 'center',
        children: [
            {
                name: '学生信息',
                path: 'studentinfor',
            },
            {
                name: '修改密码',
                path: 'password',
            },
        ],
    },{
        name: '课程成绩',
        icon: 'user',
        path: 'course',
    }],
    teacher: [{
        name: '个人中心',
        icon: 'user',
        path: 'center',
        children: [
            {
                name: '教师信息',
                path: 'teacherinfor',
            },
            {
                name: '修改密码',
                path: 'password',
            },
        ],
    },{
        name: '上传成绩',
        icon: 'user',
        path: 'uploadgrade',
    },{
        name: '确认上传',
        icon: 'user',
        path: 'confirmupload',
    }],
    admin: [{
        name: '个人中心',
        icon: 'user',
        path: 'center',
        children: [
            {
                name: '教师信息',
                path: 'teacherinfor',
            },
            {
                name: '修改密码',
                path: 'password',
            },
        ],
    },{
        name: '用户管理',
        icon: 'user',
        path: 'usermanage',
        children: [
            {
                name: '学生档案',
                path: 'studentlist',
            },
            {
                name: '教师档案',
                path: 'teacherlist',
            },
        ],
    },{
        name: '授课安排',
        icon: 'user',
        path: 'teachschedule',
    },{
        name: '班级管理',
        icon: 'user',
        path: 'classmanage',
    }],
    counselor: [{
        name: '个人中心',
        icon: 'user',
        path: 'center',
        children: [
            {
                name: '教师信息',
                path: 'teacherinfor',
            },
            {
                name: '修改密码',
                path: 'password',
            },
        ],
    },{
        name: '学生成绩',
        icon: 'user',
        path: 'course',
    }],
};

export const getPermissions = (req, res) => {
    const { token } = req.body;
    res.status(203).json({
        status: true,
        code: 200,
        menu: userPermissions[token],
    })
}